<template>
  <div>
      <a-card>
          <a-card-grid style="width: 33%; text-align: center;">
              <span>电子木鱼</span>
              <a-space :size="20" style="margin-top: 16px;">
                  <a-button type="primary" size="small" @click="visible = true">配置</a-button>
                  <a-button type="primary" size="small" @click="visible = true">创建</a-button>
              </a-space>
          </a-card-grid>
          <a-card-grid style="width: 33%; text-align: center">
              <span>桌面小卡片</span>
              <a-space :size="20" style="margin-top: 16px;">
                  <a-button type="primary" size="small" @click="visible = true">配置</a-button>
                  <a-button type="primary" size="small" @click="visible = true">创建</a-button>
              </a-space>
          </a-card-grid>
          <a-card-grid style="width: 33%; text-align: center">
              <span>桌面小卡片</span>
              <a-space :size="20" style="margin-top: 16px;">
                  <a-button type="primary" size="small" @click="visible = true">配置</a-button>
                  <a-button type="primary" size="small" @click="visible = true">创建</a-button>
              </a-space>
          </a-card-grid>
          <a-card-grid style="width: 33%; text-align: center">
              <span>桌面小卡片</span>
              <a-space :size="20" style="margin-top: 16px;">
                  <a-button type="primary" size="small" @click="visible = true">配置</a-button>
                  <a-button type="primary" size="small" @click="visible = true">创建</a-button>
              </a-space>
          </a-card-grid>
          <a-card-grid style="width: 33%; text-align: center">
              <span>桌面小卡片</span>
              <a-space :size="20" style="margin-top: 16px;">
                  <a-button type="primary" size="small" @click="visible = true">配置</a-button>
                  <a-button type="primary" size="small" @click="visible = true">创建</a-button>
              </a-space>
          </a-card-grid>
          <a-card-grid style="width: 33%; text-align: center">
              <span>桌面小卡片</span>
              <a-space :size="20" style="margin-top: 16px;">
                  <a-button type="primary" size="small" @click="visible = true">配置</a-button>
                  <a-button type="primary" size="small" @click="visible = true">创建</a-button>
              </a-space>
          </a-card-grid>
          <a-card-grid style="width: 33%; text-align: center">
              <span>桌面小卡片</span>
              <a-space :size="20" style="margin-top: 16px;">
                  <a-button type="primary" size="small" @click="visible = true">配置</a-button>
                  <a-button type="primary" size="small" @click="visible = true">创建</a-button>
              </a-space>
          </a-card-grid>
          <a-card-grid style="width: 33%; text-align: center">
              <span>桌面小卡片</span>
              <a-space :size="20" style="margin-top: 16px;">
                  <a-button type="primary" size="small" @click="visible = true">配置</a-button>
                  <a-button type="primary" size="small" @click="visible = true">创建</a-button>
              </a-space>
          </a-card-grid>
          <a-card-grid style="width: 33%; text-align: center">
              <span>桌面小卡片</span>
              <a-space :size="20" style="margin-top: 16px;">
                  <a-button type="primary" size="small" @click="visible = true">配置</a-button>
                  <a-button type="primary" size="small" @click="DeskTopCardClick">创建</a-button>
              </a-space>
          </a-card-grid>
      </a-card>
      <a-drawer
              :width="400"
              title="Basic Drawer"
              placement="right"
              :visible="visible"
              @close="visible = false"
      >
          <template #extra>
              <a-button style="margin-right: 8px" @click="onClose">Cancel</a-button>
              <a-button type="primary" @click="onClose">Submit</a-button>
          </template>
          <div>
              <a-form :model="windowConfig"
                      :label-col="{ span: 10 }"
              >
                  <a-form-item label="宽度">
                      <a-input v-model:value="windowConfig.name" />
                  </a-form-item>
                  <a-form-item label="高度">
                      <a-switch v-model:checked="windowConfig.delivery" />
                  </a-form-item>
                  <a-form-item label="是否显示边框标题栏">
                      <a-radio-group v-model:value="windowConfig.resource">
                          <a-radio value="1">Sponsor</a-radio>
                          <a-radio value="2">Venue</a-radio>
                      </a-radio-group>
                  </a-form-item>
                  <a-form-item label="Activity form">
                      <a-input v-model:value="windowConfig.desc" type="textarea" />
                  </a-form-item>
                  <a-form-item name="area" label="标题栏样式" :rules="[{ required: true, message: '请选择标题栏样式' }]">
                      <a-select v-model:value="windowConfig.titleBarStyle" :options="areas" />
                  </a-form-item>
              </a-form>
              <a-button>aaa</a-button>
          </div>
      </a-drawer>
  </div>
</template>
<script setup>
import { ref,reactive } from 'vue';
import {getCurrentInstance} from 'vue'
const { proxy } = getCurrentInstance()
const visible = ref(false);
const { send } = window.myAPI
function DeskTopCardClick(){
    send("window-new","{aa:aa}")
}
let windowConfig = reactive({
    backgroundColor:'',
    show:true,
    frame:true,
    resizable:true,
    maximizable:true,
    minimizable:true,
    fullscreenable:true,
    skipTaskbar:false,
    webSecurity:true,
    alwaysOnTop:false,
    autoHideMenuBar:false,
    titleBarStyle:'default',
    vibrancy:null,
    hasShadow:true,
    thickFrame:true,
    darkTheme:false,
    webviewTag:false,
    transparent:false
})
</script>
<route lang="yaml">
meta:
  title: home页面
  icon: windows-outlined
</route>
<style>

</style>
